package cn.kgc.itrip.mapper.itripUser;
import cn.kgc.itrip.beans.model.pojo.ItripUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ItripUserMapper {

	public ItripUser getItripUserById(@Param(value = "id") Long id)throws Exception;

	public List<ItripUser>	getItripUserListByMap(Map<String,Object> param)throws Exception;

	public Integer getItripUserCountByMap(Map<String,Object> param)throws Exception;

	public Integer insertItripUser(ItripUser itripUser)throws Exception;

	public Integer updateItripUser(ItripUser itripUser)throws Exception;

	public Integer deleteItripUserById(@Param(value = "id") Long id);

	/**
	 * 根据用户名查询用户是否存在
	 * @param userCode
	 * @return
	 */
	Integer queryUserByUserCode(String userCode);

	/**
	 * 根据用户名密码进行登录
	 * @param userCode
	 * @param password
	 * @return
	 */
	ItripUser queryUserByUserCodeAndPassword(@Param("userCode") String userCode,@Param("password") String password);

	/**
	 * 添加用户
	 *//*

	Integer insertUser(ItripUser itripUser);
*/
	/**
	 * 修改用户状态
	 *
	 */
	Integer updateUseractivated(@Param("userCode") String userCode,@Param("activated") Integer activated);

	/**
	 * 查询用户
	 */

	ItripUser selectUser(@Param("userCode") String userCode);

	Integer deleteItripUserByuserCode(@Param("userCode") String name);
}
